package myapps.ttclient;

public class GlobalVariables {
	public static int NO_LENGTH_CODE = -1;
	
	public static int AUTHORITY_GUEST = 0;
	public static int AUTHORITY_ADMIN = 1;
	public static int AUTHORITY_MEMBER = 2;
	public static int AUTHORITY_KEY_MEMBER = 3;
	
	private static int currentAuthority = AUTHORITY_GUEST;
	private static String temporaryKey = "";
	
	public static int getCurrentAuthority() {
		return currentAuthority;
	}
	
	public static Object lock_currentAuthority = new Object();
	
	public static void setCurrrentAuthority(int authority) {
		synchronized (lock_currentAuthority) {
			currentAuthority = authority;
		}
	}
	
	public static String getTemporaryKey() {
		return temporaryKey;
	}
	
	public static Object lock_temporaryKey = new Object();
	
	public static void setTemporaryKey(String tempkey) {
		synchronized (lock_temporaryKey) {
			temporaryKey = tempkey;
		}
	}
}